package day12;

public class UserService {
    public void login(User user) throws UsernameNotExistException, PasswordMismatchException {
        final String systemUsername = "admin";
        final String systemPassword = "123456";
        if(!user.getUsername().equals(systemUsername))  throw new UsernameNotExistException();
        if(!user.getPassword().equals(systemPassword))  throw new PasswordMismatchException();
    }
}
